<div style="padding:10px 20px 20px 20px;margin:0px 0;">
	<div style="float:left;margin:10px 0px 10px 0;width:100%;">
	<form th:id="${formID}" action="#"  method="post" enctype="multipart/form-data">
		<div style="margin:0 20px;float:left;">
		<input  id="equmtId" class="easyui-textbox wd50" type="text" 
					th:label="#{weightInfo.equmtId}+'  :'" label="设备id"  name="equmtId"   />
			<br style="clear:both;">
		</div>
		<div style="margin:0 20px;float:left;">
		<input  id="orgId" class="easyui-textbox wd50" type="text" 
					th:label="#{weightInfo.orgId}+'  :'" label="机构id"  name="orgId"   />
			<br style="clear:both;">
		</div>
		<div style="margin:0 20px;float:left;">
		<input  id="weightDate" class="easyui-textbox wd50" type="text" 
					th:label="#{weightInfo.weightDate}+'  :'" label="称重时间"  name="weightDate"   />
			<br style="clear:both;">
		</div>
		<div style="margin:0 20px;float:left;">
		<input  id="weightCount" class="easyui-textbox wd50" type="text" 
					th:label="#{weightInfo.weightCount}+'  :'" label="重量"  name="weightCount"   />
			<br style="clear:both;">
		</div>
		<div style="margin:0 20px;float:left;">
		<input  id="weightData" class="easyui-textbox wd50" type="text" 
					th:label="#{weightInfo.weightData}+'  :'" label="称重记录数据"  name="weightData"   />
			<br style="clear:both;">
		</div>
		<div style="margin:0 20px;float:left;">
		<input  id="weightSeq" class="easyui-textbox wd50" type="text" 
					th:label="#{weightInfo.weightSeq}+'  :'" label="序号"  name="weightSeq"   />
			<br style="clear:both;">
		</div>
		<div style="margin:0 20px;float:left;">
		<input  id="weightTime" class="easyui-textbox wd50" type="text" 
					th:label="#{weightInfo.weightTime}+'  :'" label="年月日时分秒"  name="weightTime"   />
			<br style="clear:both;">
		</div>
		<div style="margin:0 20px;float:left;">
		<input  id="weightCar" class="easyui-textbox wd50" type="text" 
					th:label="#{weightInfo.weightCar}+'  :'" label="车号"  name="weightCar"   />
			<br style="clear:both;">
		</div>
		<div style="margin:0 20px;float:left;">
		<input  id="weightOrg" class="easyui-textbox wd50" type="text" 
					th:label="#{weightInfo.weightOrg}+'  :'" label="单位号"  name="weightOrg"   />
			<br style="clear:both;">
		</div>
		<div style="margin:0 20px;float:left;">
		<input  id="weightGood" class="easyui-textbox wd50" type="text" 
					th:label="#{weightInfo.weightGood}+'  :'" label="货号"  name="weightGood"   />
			<br style="clear:both;">
		</div>
		<div style="margin:0 20px;float:left;">
		<input  id="weightMweight" class="easyui-textbox wd50" type="text" 
					th:label="#{weightInfo.weightMweight}+'  :'" label="毛重"  name="weightMweight"   />
			<br style="clear:both;">
		</div>
		<div style="margin:0 20px;float:left;">
		<input  id="weightPweight" class="easyui-textbox wd50" type="text" 
					th:label="#{weightInfo.weightPweight}+'  :'" label="皮重"  name="weightPweight"   />
			<br style="clear:both;">
		</div>
		<div style="margin:0 20px;float:left;">
		<input  id="weightStatus" class="easyui-textbox wd50" type="text" 
					th:label="#{weightInfo.weightStatus}+'  :'" label="状态"  name="weightStatus"   />
			<br style="clear:both;">
		</div>
		<div style="margin:0 20px;float:left;clear:right;">
			<a th:href="'javascript:search(\''+${formID}+'\')'" class="easyui-linkbutton" iconCls="icon-search">查询</a>
		</div>
	</form>
	</div>
	<div style="float:left;margin-bottom:1px;width:100%;">
	<div style="float:left;">
		<a th:href="'javascript:batchdel(\''+${formID}+'\')'" class="easyui-linkbutton">批量删除</a>
		<input th:id="'show'+${formID}" type="hidden" th:value="@{weight/weightInfo/queryForWeightInfoDetail}" />
		<input th:id="'edit'+${formID}" type="hidden" th:value="@{weight/weightInfo/addWeightInfo}" /> 
		<input th:id="'del'+${formID}" type="hidden" th:value="@{weight/weightInfo/deleteByWeightInfoId}" />
		<input th:id="'mid'+${formID}" type="hidden" value="weightId" />
		<input th:id="'batchdel'+${formID}" type="hidden" th:value="@{weight/weightInfo/deleteByWeightInfoIdBatch}" /> 
	</div>
	<div style="margin-left:10px;float:right;">
		<a th:id="'imp'+${formID}"  href="#" class="easyui-linkbutton" iconCls="" th:onclick="'javascript:importExcelMode(\''+${formID}+'\')'">导入</a>&nbsp;
		<a href="#" class="easyui-linkbutton" iconCls="" th:onclick="'javascript:downloadExcelMode(\''+@{/UploadFiles/Fj/AqglHseAqjc.xlsx}+'\')'">下载模板</a> &nbsp;
		<a href="#" class="easyui-linkbutton" iconCls="" onclick="exportExcelMode(\''+${formID}+'\')'">导出</a>
		
	</div>
	<form th:id="'impForm'+${formID}" action="#"  method="post" enctype="multipart/form-data"> 
		<div style="margin-left:10px;float:right;">
			<input class="easyui-filebox"
			data-options="label:'导入文件:',prompt:'请选择一个Excel文件',buttonText:'选择文件',
			accept:'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel'"
			th:id="'file'+${formID}"  name="file" style="width:300px;">
		</div>
	</form>
	</div>

	<table  th:id="'datagrid'+${formID}" class="easyui-datagrid" title="称重记录表" style="width:100%;"
			data-options="url:'weight/weightInfo/queryForWeightInfoListDG',
			method:'get',rownumbers:true, nowrap: false,singleSelect:false,autoRowHeight: true,
			fitColumns: true,striped:true,idField:'menuInfoId',loadMsg: '正在加载...',pagination:true,pageSize:10">
		<thead data-options="frozen:true">
			<tr>
				<th data-options="field:'ck',checkbox:true" ></th>
				<th data-options="field:'equmtId',resizable:true,halign:'center'" width="15%"><span th:text="#{weightInfo.equmtId}">设备id</span></th>
				<th data-options="field:'orgId',resizable:true,halign:'center'" width="15%"><span th:text="#{weightInfo.orgId}">机构id</span></th>
				<th data-options="field:'weightDate',resizable:true,halign:'center'" width="15%"><span th:text="#{weightInfo.weightDate}">称重时间</span></th>
				<th data-options="field:'weightCount',resizable:true,halign:'center'" width="15%"><span th:text="#{weightInfo.weightCount}">重量</span></th>
				<th data-options="field:'weightData',resizable:true,halign:'center'" width="15%"><span th:text="#{weightInfo.weightData}">称重记录数据</span></th>
				<th data-options="field:'weightSeq',resizable:true,halign:'center'" width="15%"><span th:text="#{weightInfo.weightSeq}">序号</span></th>
				<th data-options="field:'weightTime',resizable:true,halign:'center'" width="15%"><span th:text="#{weightInfo.weightTime}">年月日时分秒</span></th>
				<th data-options="field:'weightCar',resizable:true,halign:'center'" width="15%"><span th:text="#{weightInfo.weightCar}">车号</span></th>
				<th data-options="field:'weightOrg',resizable:true,halign:'center'" width="15%"><span th:text="#{weightInfo.weightOrg}">单位号</span></th>
				<th data-options="field:'weightGood',resizable:true,halign:'center'" width="15%"><span th:text="#{weightInfo.weightGood}">货号</span></th>
				<th data-options="field:'weightMweight',resizable:true,halign:'center'" width="15%"><span th:text="#{weightInfo.weightMweight}">毛重</span></th>
				<th data-options="field:'weightPweight',resizable:true,halign:'center'" width="15%"><span th:text="#{weightInfo.weightPweight}">皮重</span></th>
				<th data-options="field:'weightStatus',resizable:true,halign:'center'" width="15%"><span th:text="#{weightInfo.weightStatus}">状态</span></th>
			</tr>
		</thead>
	</table> 
</div> 
<script type="text/javascript">
	//操作
	function onOptWeightInfo(value,row,index){ 
		var s =  '<a class="Edit_Button" href="javascript:showDetail(\''+value+'\',\'展示《'+row.equmtId+'》详情信息\',\'[[${formID}]] \')">详细</a>'+
			'&nbsp;'+
			'<a class="Edit_Button" href="javascript:edit(\''+value+'\',\'编辑《'+row.equmtId+'》信息\',\'[[${formID}]] \')">编辑</a>'+
			'&nbsp;'+
			'<a class="Delete_Button" href="javascript:remove(\''+value+'\',\'[[${formID}]]\')" >删除</a>' ;
		return s;
	}
	
	//导入 
	function importExcelMode(formID){
		var file = $('#file'+formID).filebox('getValue');
		if(file==""){ 
			 $.messager.alert({ width: 350, title:'温馨提示', msg:'导入文件不能为空!', icon:'info'});
			return; 
		}
		 $('#imp'+formID).linkbutton('disable');
		$("#impForm"+formID).ajaxSubmit({
			type: "post",
			dataType: "json",
			url: '[[@{weight/weightInfo/importGenerateInfo }]]', 
			success:function(data){ 
				$('#imp'+formID).linkbutton('enable'); 
				console.log(data)
				if (data.code == 200) {
					dataReload(formID); 
					$.messager.alert({width: 280,title: '操作成功',msg: data.msg, icon:'info'});
				}else{
					$.messager.alert({ width: 280, title:'数据提交异常', msg:data.msg});
				}
			},error: function (data) {
				$('#imp'+formID).linkbutton('enable'); 
				$.messager.alert('消息提醒','上传失败，数据异常！');
			}
		});
	}
			
			
		
	

</script>



				<th class="text-center"> 设备id</th>
				<th class="text-center"> 机构id</th>
				<th class="text-center"> 称重时间</th>
				<th class="text-center"> 重量</th>
				<th class="text-center"> 称重记录数据</th>
				<th class="text-center"> 序号</th>
				<th class="text-center"> 年月日时分秒</th>
				<th class="text-center"> 车号</th>
				<th class="text-center"> 单位号</th>
				<th class="text-center"> 货号</th>
				<th class="text-center"> 毛重</th>
				<th class="text-center"> 皮重</th>
				<th class="text-center"> 状态</th>
<tr th:each="weightInfo : ${weightInfoVOList}">
					    <td><input type="checkbox" name="interest" th:value="${weightInfo.weightId}"/></td>
						<td><span th:text="${weightInfoStat.count}"></span></td>				<td><span th:text="${weightInfo.equmtId}"></span></td>
				<td><span th:text="${weightInfo.orgId}"></span></td>
				<td><span th:text="${weightInfo.weightDate}"></span></td>
				<td><span th:text="${weightInfo.weightCount}"></span></td>
				<td><span th:text="${weightInfo.weightData}"></span></td>
				<td><span th:text="${weightInfo.weightSeq}"></span></td>
				<td><span th:text="${weightInfo.weightTime}"></span></td>
				<td><span th:text="${weightInfo.weightCar}"></span></td>
				<td><span th:text="${weightInfo.weightOrg}"></span></td>
				<td><span th:text="${weightInfo.weightGood}"></span></td>
				<td><span th:text="${weightInfo.weightMweight}"></span></td>
				<td><span th:text="${weightInfo.weightPweight}"></span></td>
				<td><span th:text="${weightInfo.weightStatus}"></span></td>
